// 节点样式类型
export interface NodeStyle {
  color: string;
  shape: "rect" | "circle" | "diamond" | "star" | string;
  size: number;
}

// 节点元数据类型
export interface NodeMetadata {
  [key: string]: string | number | undefined | object;
}

// 单个节点类型
export interface GraphNode {
  id: string;
  label: string;
  metadata?: NodeMetadata;
  style: NodeStyle;
  type: string;
}

// 边样式类型
export interface EdgeStyle {
  color: string;
  lineStyle: "solid" | "dashed" | "dotted" | string;
  width: number;
}

// 边元数据类型
export interface EdgeMetadata {
  [key: string]: string | number | undefined | object;
}

// 单个边类型
export interface GraphEdge {
  id: string;
  label: string;
  source: string;
  target: string;
  style: EdgeStyle;
  type: string;
  metadata?: EdgeMetadata;
}

